<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>3dchess: AbstractGameLogic Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">3dchess
   </div>
   <div id="projectbrief">Basic chess application with OpenGL graphics and AI</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="class_abstract_game_logic-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">AbstractGameLogic Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Interface for chess game logic implementations.  
 <a href="class_abstract_game_logic.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_abstract_game_logic_8h_source.html">AbstractGameLogic.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for AbstractGameLogic:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_abstract_game_logic.png" usemap="#AbstractGameLogic_map" alt=""/>
  <map id="AbstractGameLogic_map" name="AbstractGameLogic_map">
<area href="class_game_logic.html" title="GameLogic implementation for a game of chess with observers. " alt="GameLogic" shape="rect" coords="0,56,122,80"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:abef377fe1eb655c3af96f33453ddbb79"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abef377fe1eb655c3af96f33453ddbb79"></a>
virtual AbstractPlayerPtr&#160;</td><td class="memItemRight" valign="bottom"><b>getWhitePlayer</b> () const =0</td></tr>
<tr class="separator:abef377fe1eb655c3af96f33453ddbb79"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4ce7e415aadaa446a33b38a8754febc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa4ce7e415aadaa446a33b38a8754febc"></a>
virtual AbstractPlayerPtr&#160;</td><td class="memItemRight" valign="bottom"><b>getBlackPlayer</b> () const =0</td></tr>
<tr class="separator:aa4ce7e415aadaa446a33b38a8754febc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a523af5dd0224a3b368dced118c1d6625"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_abstract_game_logic.html#a523af5dd0224a3b368dced118c1d6625">addObserver</a> (AbstractGameObserverPtr observer)=0</td></tr>
<tr class="memdesc:a523af5dd0224a3b368dced118c1d6625"><td class="mdescLeft">&#160;</td><td class="mdescRight">Registers an observer for game events.  <a href="#a523af5dd0224a3b368dced118c1d6625">More...</a><br/></td></tr>
<tr class="separator:a523af5dd0224a3b368dced118c1d6625"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1acbb3bc5df48339c44c57075d9eb680"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_abstract_game_logic.html#a1acbb3bc5df48339c44c57075d9eb680">isGameOver</a> () const =0</td></tr>
<tr class="separator:a1acbb3bc5df48339c44c57075d9eb680"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b037507bbf853dc12ced1edb9c34e6b"><td class="memItemLeft" align="right" valign="top">virtual PlayerColor&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_abstract_game_logic.html#a5b037507bbf853dc12ced1edb9c34e6b">getWinner</a> () const =0</td></tr>
<tr class="separator:a5b037507bbf853dc12ced1edb9c34e6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a3d2369e905cbc22cde69f3eb30e47b"><td class="memItemLeft" align="right" valign="top">virtual GameConfigurationPtr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_abstract_game_logic.html#a7a3d2369e905cbc22cde69f3eb30e47b">getConfiguration</a> () const =0</td></tr>
<tr class="separator:a7a3d2369e905cbc22cde69f3eb30e47b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8dd1e091416320558bca6e04b49f88fb"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_abstract_game_logic.html#a8dd1e091416320558bca6e04b49f88fb">start</a> ()</td></tr>
<tr class="memdesc:a8dd1e091416320558bca6e04b49f88fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts the game logic thread.  <a href="#a8dd1e091416320558bca6e04b49f88fb">More...</a><br/></td></tr>
<tr class="separator:a8dd1e091416320558bca6e04b49f88fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f87090c8542b9f15d3271ddc8b428f3"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_abstract_game_logic.html#a2f87090c8542b9f15d3271ddc8b428f3">join</a> ()</td></tr>
<tr class="memdesc:a2f87090c8542b9f15d3271ddc8b428f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Will block until the logic thread terminated.  <a href="#a2f87090c8542b9f15d3271ddc8b428f3">More...</a><br/></td></tr>
<tr class="separator:a2f87090c8542b9f15d3271ddc8b428f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3483574a5ea9fffdb5037a66641cfc45"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3483574a5ea9fffdb5037a66641cfc45"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_abstract_game_logic.html#a3483574a5ea9fffdb5037a66641cfc45">stop</a> ()=0</td></tr>
<tr class="memdesc:a3483574a5ea9fffdb5037a66641cfc45"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initiates a shutdown of the game logic. <br/></td></tr>
<tr class="separator:a3483574a5ea9fffdb5037a66641cfc45"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a185f9cff8f72348f4805375ec88539b5"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_abstract_game_logic.html#a185f9cff8f72348f4805375ec88539b5">run</a> ()=0</td></tr>
<tr class="memdesc:a185f9cff8f72348f4805375ec88539b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Actual game logic function.  <a href="#a185f9cff8f72348f4805375ec88539b5">More...</a><br/></td></tr>
<tr class="separator:a185f9cff8f72348f4805375ec88539b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a06cdc7309d6103d73d1ba8ed93f8729e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a06cdc7309d6103d73d1ba8ed93f8729e"></a>
std::thread&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_abstract_game_logic.html#a06cdc7309d6103d73d1ba8ed93f8729e">m_thread</a></td></tr>
<tr class="memdesc:a06cdc7309d6103d73d1ba8ed93f8729e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Game logic thread. <br/></td></tr>
<tr class="separator:a06cdc7309d6103d73d1ba8ed93f8729e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Interface for chess game logic implementations. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a523af5dd0224a3b368dced118c1d6625"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void AbstractGameLogic::addObserver </td>
          <td>(</td>
          <td class="paramtype">AbstractGameObserverPtr&#160;</td>
          <td class="paramname"><em>observer</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Registers an observer for game events. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="class_abstract_game_observer.html" title="Allows to observe relevant GameEvents inside the GameLogic. ">AbstractGameObserver</a> for the available events. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">observer</td><td>Observer to register. </td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="class_game_logic.html#adb1079537a901e860b11398d66c50286">GameLogic</a>.</p>

</div>
</div>
<a class="anchor" id="a7a3d2369e905cbc22cde69f3eb30e47b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual GameConfigurationPtr AbstractGameLogic::getConfiguration </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_game_configuration.html" title="Class for holding game configuration parameters. ">GameConfiguration</a> currently used. </dd></dl>

<p>Implemented in <a class="el" href="class_game_logic.html#a6397a2b36a7aa7d60d7ae49da00a9263">GameLogic</a>.</p>

</div>
</div>
<a class="anchor" id="a5b037507bbf853dc12ced1edb9c34e6b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual PlayerColor AbstractGameLogic::getWinner </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>If isGameOver returns the winner of the game. </dd></dl>

<p>Implemented in <a class="el" href="class_game_logic.html#aca3264bf6955426c20712a8216365b57">GameLogic</a>.</p>

</div>
</div>
<a class="anchor" id="a1acbb3bc5df48339c44c57075d9eb680"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool AbstractGameLogic::isGameOver </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>true if game has ended. </dd></dl>

<p>Implemented in <a class="el" href="class_game_logic.html#a6c26b311430837d51cc7696c8094abbc">GameLogic</a>.</p>

</div>
</div>
<a class="anchor" id="a2f87090c8542b9f15d3271ddc8b428f3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void AbstractGameLogic::join </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Will block until the logic thread terminated. </p>
<p>Be sure to call stop first to initiate logic thread shutdown. </p>

</div>
</div>
<a class="anchor" id="a185f9cff8f72348f4805375ec88539b5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void AbstractGameLogic::run </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Actual game logic function. </p>
<p>Called by start function on the game logic thread to run the actual logic. </p>

<p>Implemented in <a class="el" href="class_game_logic.html#a29927895ae4be5d9d868d362f990274c">GameLogic</a>.</p>

</div>
</div>
<a class="anchor" id="a8dd1e091416320558bca6e04b49f88fb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void AbstractGameLogic::start </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Starts the game logic thread. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="class_abstract_game_logic.html#a185f9cff8f72348f4805375ec88539b5" title="Actual game logic function. ">run</a> </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>S:/dev/3dchess/src/logic/interface/<a class="el" href="_abstract_game_logic_8h_source.html">AbstractGameLogic.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Mar 9 2014 23:12:55 for 3dchess by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>
